#! /bin/sh /usr/share/dpatch/dpatch-run
## 12_new_configure.dpatch by  <jblache@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: New configure script, includes changes made to configure.in by previous patches.

@DPATCH@
diff -urNad sane-backends-1.0.19~/configure sane-backends-1.0.19/configure
--- sane-backends-1.0.19~/configure	2008-02-11 00:02:31.000000000 +0100
+++ sane-backends-1.0.19/configure	2008-02-12 21:30:12.625390160 +0100
@@ -849,12 +849,20 @@
 DL_LIB
 DYNAMIC_FLAG
 USE_LINKS
-INSTALL_LOCKPATH
-LOCKPATH_GROUP
+LIBM
+LIBCAM
+LIBJPEG
+LIBTIFF
+LIBIEEE1284
+LIBPTHREAD
 HAVE_GPHOTO2
 GPHOTO2_LDFLAGS
+LIBGPHOTO2
+INSTALL_LOCKPATH
+LOCKPATH_GROUP
 ALLOCA
 LIBOBJS
+LIBUSB
 LN_S
 ECHO
 AR
@@ -1509,8 +1517,8 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-docdir=DIR       documentation [PREFIX/doc/sane-VERSION]
-  --with-group            use the specified group for lock dir [default=uucp]
   --with-gphoto2          include the gphoto2 backend [default=yes]
+  --with-group            use the specified group for lock dir [default=uucp]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
@@ -6396,7 +6404,6 @@
   esac
 
 
-
 { echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
 echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
 if test "${ac_cv_lib_m_sqrt+set}" = set; then
@@ -6459,22 +6466,20 @@
 { echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
 echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
 if test $ac_cv_lib_m_sqrt = yes; then
-  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBM 1
 _ACEOF
-
-  LIBS="-lm $LIBS"
-
+ LIBM="-lm"
 fi
 
 
-{ echo "$as_me:$LINENO: checking for scsireq_enter in -lscsi" >&5
-echo $ECHO_N "checking for scsireq_enter in -lscsi... $ECHO_C" >&6; }
-if test "${ac_cv_lib_scsi_scsireq_enter+set}" = set; then
+{ echo "$as_me:$LINENO: checking for cam_open_device in -lcam" >&5
+echo $ECHO_N "checking for cam_open_device in -lcam... $ECHO_C" >&6; }
+if test "${ac_cv_lib_cam_cam_open_device+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lscsi  $LIBS"
+LIBS="-lcam  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6488,11 +6493,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char scsireq_enter ();
+char cam_open_device ();
 int
 main ()
 {
-return scsireq_enter ();
+return cam_open_device ();
   ;
   return 0;
 }
@@ -6515,37 +6520,37 @@
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_scsi_scsireq_enter=yes
+  ac_cv_lib_cam_cam_open_device=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_scsi_scsireq_enter=no
+	ac_cv_lib_cam_cam_open_device=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_scsi_scsireq_enter" >&5
-echo "${ECHO_T}$ac_cv_lib_scsi_scsireq_enter" >&6; }
-if test $ac_cv_lib_scsi_scsireq_enter = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSCSI 1
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_cam_cam_open_device" >&5
+echo "${ECHO_T}$ac_cv_lib_cam_cam_open_device" >&6; }
+if test $ac_cv_lib_cam_cam_open_device = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBCAM 1
 _ACEOF
+ LIBCAM="-lcam"
+fi
+   # FreeBSD 3+ needs this
 
-  LIBS="-lscsi $LIBS"
 
-fi
-	# FreeBSD needs this
 
-{ echo "$as_me:$LINENO: checking for cam_open_device in -lcam" >&5
-echo $ECHO_N "checking for cam_open_device in -lcam... $ECHO_C" >&6; }
-if test "${ac_cv_lib_cam_cam_open_device+set}" = set; then
+{ echo "$as_me:$LINENO: checking for scsireq_enter in -lscsi" >&5
+echo $ECHO_N "checking for scsireq_enter in -lscsi... $ECHO_C" >&6; }
+if test "${ac_cv_lib_scsi_scsireq_enter+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcam  $LIBS"
+LIBS="-lscsi  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6559,11 +6564,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char cam_open_device ();
+char scsireq_enter ();
 int
 main ()
 {
-return cam_open_device ();
+return scsireq_enter ();
   ;
   return 0;
 }
@@ -6586,29 +6591,30 @@
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_cam_cam_open_device=yes
+  ac_cv_lib_scsi_scsireq_enter=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_cam_cam_open_device=no
+	ac_cv_lib_scsi_scsireq_enter=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_cam_cam_open_device" >&5
-echo "${ECHO_T}$ac_cv_lib_cam_cam_open_device" >&6; }
-if test $ac_cv_lib_cam_cam_open_device = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_scsi_scsireq_enter" >&5
+echo "${ECHO_T}$ac_cv_lib_scsi_scsireq_enter" >&6; }
+if test $ac_cv_lib_scsi_scsireq_enter = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCAM 1
+#define HAVE_LIBSCSI 1
 _ACEOF
 
-  LIBS="-lcam $LIBS"
+  LIBS="-lscsi $LIBS"
 
 fi
-      # FreeBSD 3+ needs this
+	# FreeBSD needs this
+
 if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then
     { echo "$as_me:$LINENO: checking for library containing gethostbyaddr" >&5
 echo $ECHO_N "checking for library containing gethostbyaddr... $ECHO_C" >&6; }
@@ -6861,6 +6867,7 @@
             # OS/2 needs -lsyslog, BeOS needs -lbe
 fi
 
+
   { echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5
 echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6; }
 if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then
@@ -7073,7 +7080,7 @@
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "sane_correct_jpeg_lib_version_found" >/dev/null 2>&1; then
-  sane_cv_use_libjpeg="yes"; LIBS="${LIBS} -ljpeg";
+  sane_cv_use_libjpeg="yes"; LIBJPEG="-ljpeg";
       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 else
@@ -7091,6 +7098,8 @@
 
 
 
+
+
   { echo "$as_me:$LINENO: checking for TIFFFdOpen in -ltiff" >&5
 echo $ECHO_N "checking for TIFFFdOpen in -ltiff... $ECHO_C" >&6; }
 if test "${ac_cv_lib_tiff_TIFFFdOpen+set}" = set; then
@@ -7285,7 +7294,7 @@
 
 fi
 if test $ac_cv_header_tiffio_h = yes; then
-  sane_cv_use_libtiff="yes"; LIBS="${LIBS} -ltiff"
+  sane_cv_use_libtiff="yes"; LIBTIFF="-ltiff"
 fi
 
 
@@ -7294,6 +7303,8 @@
 
 
 
+
+
   if test "${ac_cv_header_ieee1284_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for ieee1284.h" >&5
 echo $ECHO_N "checking for ieee1284.h... $ECHO_C" >&6; }
@@ -7467,7 +7478,7 @@
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  sane_cv_use_libieee1284="yes"; LIBS="${LIBS} -lieee1284"
+  sane_cv_use_libieee1284="yes"; LIBIEEE1284="-lieee1284"
 
 else
   echo "$as_me: failed program was:" >&5
@@ -7495,6 +7506,8 @@
 
 
 
+
+
   case "${host_os}" in
   darwin*) # currently only enabled on MacOS X
     use_pthread=yes
@@ -7656,6 +7669,7 @@
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
+       SANE_save_LIBS="${LIBS}"
 
 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
@@ -7727,7 +7741,6 @@
 
 fi
 
-       have_pthread=yes
 
 
 
@@ -7823,12 +7836,16 @@
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD 1
+_ACEOF
+ have_pthread=yes; LIBPTHREAD=-lpthread
 else
    have_pthread=no; use_pthread=no
 fi
 done
 
+       LIBS="${SANE_save_LIBS}"
 
 fi
 
@@ -7855,68 +7872,6 @@
 echo "${ECHO_T}$use_pthread" >&6; }
 
 
-  LOCKPATH_GROUP=uucp
-  use_locking=yes
-  case "${host_os}" in
-    os2* )
-      use_locking=no
-      ;;
-  esac
-
-  #
-  # we check the user
-  # Check whether --enable-locking was given.
-if test "${enable_locking+set}" = set; then
-  enableval=$enable_locking;
-      if test $enableval = yes ; then
-        use_locking=yes
-      else
-        use_locking=no
-      fi
-
-fi
-
-  if test $use_locking = yes ; then
-
-# Check whether --with-group was given.
-if test "${with_group+set}" = set; then
-  withval=$with_group; LOCKPATH_GROUP="$withval"
-
-fi
-
-    # check if the group does exist
-    lasterror=""
-    touch sanetest.file
-    chgrp $LOCKPATH_GROUP sanetest.file 2>/dev/null || lasterror=$?
-    rm -f sanetest.file
-    if test ! -z "$lasterror"; then
-      { echo "$as_me:$LINENO: WARNING: Group $LOCKPATH_GROUP does not exist on this system." >&5
-echo "$as_me: WARNING: Group $LOCKPATH_GROUP does not exist on this system." >&2;}
-      { echo "$as_me:$LINENO: WARNING: Locking feature will be disabled." >&5
-echo "$as_me: WARNING: Locking feature will be disabled." >&2;}
-      use_locking=no
-    fi
-  fi
-  if test $use_locking = yes ; then
-    INSTALL_LOCKPATH=install-lockpath
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_LOCKING 1
-_ACEOF
-
-  else
-    INSTALL_LOCKPATH=
-  fi
-  { echo "$as_me:$LINENO: checking whether to enable device locking" >&5
-echo $ECHO_N "checking whether to enable device locking... $ECHO_C" >&6; }
-  { echo "$as_me:$LINENO: result: $use_locking" >&5
-echo "${ECHO_T}$use_locking" >&6; }
-  if test $use_locking = yes ; then
-    { echo "$as_me:$LINENO: Setting lockdir group to $LOCKPATH_GROUP" >&5
-echo "$as_me: Setting lockdir group to $LOCKPATH_GROUP" >&6;}
-  fi
-
-
 
 
 
@@ -8040,9 +7995,9 @@
 			if pkg-config --exists libgphoto2 ; then
 				with_gphoto2=`pkg-config --modversion libgphoto2`
 				CPPFLAGS="${CPPFLAGS} `pkg-config --cflags libgphoto2`"
-				GPHOTO2_LIBS="`pkg-config --libs libgphoto2`"
+				LIBGPHOTO2="`pkg-config --libs libgphoto2`"
 				tmp_LIBS=""
-for param in ${GPHOTO2_LIBS}; do
+for param in ${LIBGPHOTO2}; do
   case "${param}" in
     -l*)
          tmp_LIBS="${tmp_LIBS} ${param}"
@@ -8052,16 +8007,17 @@
          ;;
   esac
 done
-GPHOTO2_LIBS="${tmp_LIBS}"
+LIBGPHOTO2="${tmp_LIBS}"
 unset tmp_LIBS
 unset param
 
 				LDFLAGS="$LDFLAGS $GPHOTO2_LDFLAGS"
 
+				old_LIBS="$LIBS"
+				LIBS="$LIBS $LIBGPHOTO2"
+
 
 
-			 	saved_LIBS="${LIBS}"
-				LIBS="${LIBS} ${GPHOTO2_LIBS}"
 				# Make sure we an really use the library
 
 for ac_func in gp_camera_init
@@ -8155,11 +8111,12 @@
 _ACEOF
  HAVE_GPHOTO2=true
 else
-   LIBS="${saved_LIBS}"
-					HAVE_GPHOTO2=false
+   HAVE_GPHOTO2=false
 fi
 done
 
+
+				LIBS="$old_LIBS"
 			else
 				HAVE_GPHOTO2=false
 			fi
@@ -8167,6 +8124,73 @@
 	fi
 
 
+
+
+
+  LOCKPATH_GROUP=uucp
+  use_locking=yes
+  case "${host_os}" in
+    os2* )
+      use_locking=no
+      ;;
+  esac
+
+  #
+  # we check the user
+  # Check whether --enable-locking was given.
+if test "${enable_locking+set}" = set; then
+  enableval=$enable_locking;
+      if test $enableval = yes ; then
+        use_locking=yes
+      else
+        use_locking=no
+      fi
+
+fi
+
+  if test $use_locking = yes ; then
+
+# Check whether --with-group was given.
+if test "${with_group+set}" = set; then
+  withval=$with_group; LOCKPATH_GROUP="$withval"
+
+fi
+
+    # check if the group does exist
+    lasterror=""
+    touch sanetest.file
+    chgrp $LOCKPATH_GROUP sanetest.file 2>/dev/null || lasterror=$?
+    rm -f sanetest.file
+    if test ! -z "$lasterror"; then
+      { echo "$as_me:$LINENO: WARNING: Group $LOCKPATH_GROUP does not exist on this system." >&5
+echo "$as_me: WARNING: Group $LOCKPATH_GROUP does not exist on this system." >&2;}
+      { echo "$as_me:$LINENO: WARNING: Locking feature will be disabled." >&5
+echo "$as_me: WARNING: Locking feature will be disabled." >&2;}
+      use_locking=no
+    fi
+  fi
+  if test $use_locking = yes ; then
+    INSTALL_LOCKPATH=install-lockpath
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_LOCKING 1
+_ACEOF
+
+  else
+    INSTALL_LOCKPATH=
+  fi
+  { echo "$as_me:$LINENO: checking whether to enable device locking" >&5
+echo $ECHO_N "checking whether to enable device locking... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: result: $use_locking" >&5
+echo "${ECHO_T}$use_locking" >&6; }
+  if test $use_locking = yes ; then
+    { echo "$as_me:$LINENO: Setting lockdir group to $LOCKPATH_GROUP" >&5
+echo "$as_me: Setting lockdir group to $LOCKPATH_GROUP" >&6;}
+  fi
+
+
+
+
 { echo "$as_me:$LINENO: checking for sane_init in -lsane" >&5
 echo $ECHO_N "checking for sane_init in -lsane... $ECHO_C" >&6; }
 if test "${ac_cv_lib_sane_sane_init+set}" = set; then
@@ -11576,8 +11600,7 @@
 
 
 if test "${ac_cv_header_usb_h}" = "yes" && test "$USE_LIBUSB" = "yes" ; then
-
-{ echo "$as_me:$LINENO: checking for usb_interrupt_read in -lusb" >&5
+  { echo "$as_me:$LINENO: checking for usb_interrupt_read in -lusb" >&5
 echo $ECHO_N "checking for usb_interrupt_read in -lusb... $ECHO_C" >&6; }
 if test "${ac_cv_lib_usb_usb_interrupt_read+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11639,12 +11662,10 @@
 { echo "$as_me:$LINENO: result: $ac_cv_lib_usb_usb_interrupt_read" >&5
 echo "${ECHO_T}$ac_cv_lib_usb_usb_interrupt_read" >&6; }
 if test $ac_cv_lib_usb_usb_interrupt_read = yes; then
-  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBUSB 1
 _ACEOF
-
-  LIBS="-lusb $LIBS"
-
+ LIBUSB="-lusb"
 fi
 
   if test "${ac_cv_lib_usb_usb_interrupt_read}" = "yes" ; then
@@ -11652,6 +11673,7 @@
   fi
 fi
 
+
 if sparc64 -q > /dev/null 2>&1 ; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -12423,7 +12445,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 12426 "configure"' > conftest.$ac_ext
+  echo '#line 12448 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14866,11 +14888,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14869: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14891: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14873: \$? = $ac_status" >&5
+   echo "$as_me:14895: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15134,11 +15156,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15137: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15159: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15141: \$? = $ac_status" >&5
+   echo "$as_me:15163: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15238,11 +15260,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15241: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15263: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15245: \$? = $ac_status" >&5
+   echo "$as_me:15267: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17546,7 +17568,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17549 "configure"
+#line 17571 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17646,7 +17668,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17649 "configure"
+#line 17671 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19986,11 +20008,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19989: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20011: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19993: \$? = $ac_status" >&5
+   echo "$as_me:20015: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -20090,11 +20112,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20093: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20115: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:20097: \$? = $ac_status" >&5
+   echo "$as_me:20119: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21660,11 +21682,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21663: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21685: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:21667: \$? = $ac_status" >&5
+   echo "$as_me:21689: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -21764,11 +21786,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21767: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21789: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:21771: \$? = $ac_status" >&5
+   echo "$as_me:21793: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -23966,11 +23988,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:23969: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:23991: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:23973: \$? = $ac_status" >&5
+   echo "$as_me:23995: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -24234,11 +24256,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:24237: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:24259: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:24241: \$? = $ac_status" >&5
+   echo "$as_me:24263: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -24338,11 +24360,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:24341: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:24363: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:24345: \$? = $ac_status" >&5
+   echo "$as_me:24367: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -27957,22 +27979,22 @@
 DL_LIB!$DL_LIB$ac_delim
 DYNAMIC_FLAG!$DYNAMIC_FLAG$ac_delim
 USE_LINKS!$USE_LINKS$ac_delim
-INSTALL_LOCKPATH!$INSTALL_LOCKPATH$ac_delim
-LOCKPATH_GROUP!$LOCKPATH_GROUP$ac_delim
+LIBM!$LIBM$ac_delim
+LIBCAM!$LIBCAM$ac_delim
+LIBJPEG!$LIBJPEG$ac_delim
+LIBTIFF!$LIBTIFF$ac_delim
+LIBIEEE1284!$LIBIEEE1284$ac_delim
+LIBPTHREAD!$LIBPTHREAD$ac_delim
 HAVE_GPHOTO2!$HAVE_GPHOTO2$ac_delim
 GPHOTO2_LDFLAGS!$GPHOTO2_LDFLAGS$ac_delim
+LIBGPHOTO2!$LIBGPHOTO2$ac_delim
+INSTALL_LOCKPATH!$INSTALL_LOCKPATH$ac_delim
+LOCKPATH_GROUP!$LOCKPATH_GROUP$ac_delim
 ALLOCA!$ALLOCA$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
+LIBUSB!$LIBUSB$ac_delim
 LN_S!$LN_S$ac_delim
 ECHO!$ECHO$ac_delim
-AR!$AR$ac_delim
-RANLIB!$RANLIB$ac_delim
-STRIP!$STRIP$ac_delim
-DLLTOOL!$DLLTOOL$ac_delim
-AS!$AS$ac_delim
-OBJDUMP!$OBJDUMP$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -28014,6 +28036,14 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+AR!$AR$ac_delim
+RANLIB!$RANLIB$ac_delim
+STRIP!$STRIP$ac_delim
+DLLTOOL!$DLLTOOL$ac_delim
+AS!$AS$ac_delim
+OBJDUMP!$OBJDUMP$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
 ac_ct_CXX!$ac_ct_CXX$ac_delim
 CXXCPP!$CXXCPP$ac_delim
 F77!$F77$ac_delim
@@ -28035,7 +28065,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
